K-Nearest Neighbors Demo
Instructions:
- Select the type of point you want to place (Red or Blue) using the dropdown menu.
- Click anywhere on the canvas to place the selected point.
- Click on an existing point to select it. The `K` nearest neighbors of the selected point will be highlighted with lines.
- Adjust the number of neighbors (K) using the input box to see how the neighbors and decision boundary change dynamically.
- Select a distance metric from the dropdown to observe its effect on the decision boundaries.
- Use the "Clear Points" button to reset the canvas and start over.